using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;

namespace ProjectManageSystemApi.DbEntity
{

    [JsonObject(MemberSerialization.OptIn), Table(Name = "pre_final_account_file", DisableSyncStructure = true)]
	public partial class PreFinalAccountFile {

		[JsonProperty, Column(Name = "id", DbType = "int unsigned", IsPrimary = true, IsIdentity = true)]
		public uint Id { get; set; }

		[JsonProperty, Column(Name="project_id")]
		public int ProjectId { get; set; }

		[JsonProperty, Column(Name = "name")]
		public string Name { get; set; }

		[JsonProperty, Column(Name = "desc")]
		public string Desc { get; set; }

		/// <summary>
		/// 上传文件本地目录
		/// </summary>
		[JsonProperty, Column(Name = "file_path")]
		public string FilePath { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "create_time", DbType = "datetime")]
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", DbType = "bigint")]
		public long CreateUser { get; set; }

		/// <summary>
		/// 审核人
		/// </summary>
		[JsonProperty, Column(Name = "audit_user", DbType = "bigint")]
		public long? AuditUser { get; set; }

		/// <summary>
		/// 审核时间
		/// </summary>
		[JsonProperty, Column(Name = "audit_time", DbType = "datetime")]
		public DateTime? AuditTime { get; set; }

		/// <summary>
		/// 审核意见
		/// </summary>
		[JsonProperty, Column(Name = "audit_comment")]
		public string AuditComment { get; set; }

		/// <summary>
		/// 状态 0：等待审批，1：同意，100：拒绝
		/// </summary>
		[JsonProperty, Column(Name = "status")]
		public byte Status { get; set; }

		[Navigate(nameof(CreateUser))]
		public UserInfo CreateUserInfo { get; set; }

		[Navigate(nameof(AuditUser))]
		public UserInfo AuditUserInfo { get; set; }

		[Navigate(nameof(ProjectId))]
		public ProjectInfo ProjectInfo { get; set; }
	}

}
